#ifndef MAPENUMCLASS_H
#define MAPENUMCLASS_H

#include "mapEnum.h"

/**
 * @brief 测试用类，测试完成不同类型的构造
 * 
 */
class eNumTest{
public:
    typedef AttachEntity  Attach;
    typedef ConnectEntity Connect;

    // Constructors
    explicit eNumTest(Attach  atta);
    explicit eNumTest(Connect connect); 
    // 设计这个构造函数，该构造函数需要用带值和标签的量去构造
    // 类的构造函数限制为1个参数，需要这个参数的值同时也需要这个参数的标签，该怎么做？
    // eNumTest()
    eNumTest(unsigned int num);
    eNumTest() = default;

    void printAttach() const{
        std::cout << attachEntityToString(atta_) << std::endl;
    }


// deconstructor
    ~eNumTest() = default;

    static const unsigned int public_status_ = 1;

// 定义待实现的成员函数
    bool hasAttachEntity()  const;
    bool hasConnectEntity() const;

/**
 * @brief 测试private和public static的状态
 * 
 * @return unsigned int 
 */
    unsigned int getStatus() const;

private:
     Attach atta_;
     Connect conn_;
    // Must default when using const unsigned
    const unsigned int num_ = 0;
    static const unsigned int private_status_ = 1;

    // flag indicate status
    bool atta_flag = 0;
    bool conn_flag = 0;
};

// Construct outside the class
eNumTest::eNumTest(Attach atta): atta_(atta){
    atta_flag = 1;
}
eNumTest::eNumTest(unsigned int num = 0): atta_(Attach::Particle), num_(num){}

//- Should initialize atta_ (when using const)
// eNumTest::eNumTest(unsigned int num = 0):num_(num){}
eNumTest::eNumTest(Connect conn): conn_(conn){
    conn_flag = 1;
}


bool eNumTest::hasAttachEntity() const
{
    return atta_flag;
}
bool eNumTest::hasConnectEntity() const
{
    return conn_flag;
}
unsigned int eNumTest::getStatus() const{
    return public_status_;
}



#endif